package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 发票申请表
 * </p>
 *
 * @author jcd
 * @since 2024-08-19
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("e_invoice")
public class Invoice {

    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 用户ID
     */
    private String uid;

    /**
     * 申请的发票抬头
     */
    private String applyTitle;

    /**
     * 申请原因(第一次申请可不填,如果被驳回,可填入此字段再次申请)
     */
    private String applyReason;

    /**
     * 订单ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    /**
     * 订单号
     */
    private String orderNumber;


    /**
     * 商品名称
     */
    private String prodName;

    /**
     * 商品总数
     */
    private Integer productNums;

    /**
     * 状态 0:申请中 1:已开票 2:申请被驳回
     */
    private Integer state;

    /**
     * 驳回原因
     */
    private String rejectReason;

    /**
     * 发票图片url
     */
    private String invoiceImgUrl;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long createBy;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long updateBy;

    private Date createTime;

    private Date updateTime;

    @TableLogic(value="0",delval="1")
    private Integer delFlag;
}
